//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

using System.Windows;
using System.Windows.Controls;

namespace Microsoft.Research.ScientificWorkflow.ManagementStudioControls
{
    /// <summary>
    /// Interaction logic for WorkflowManagerContentView.xaml. This is the centre pane for the workflow manager module.
    /// </summary>
    public sealed partial class WorkflowManagerContentView : UserControl
    {
        public WorkflowManagerContentView()
        {
            InitializeComponent();
        }

        /// <summary>
        /// The presenter for the view.
        /// </summary>
        public object Presenter
        {
            get
            {
                return this.DataContext;
            }
            set
            {
                this.DataContext = value;
            }
        }

        /// <summary>
        /// Add the listview into the border.
        /// </summary>
        /// <param name="listView">The UI element.</param>
        public void AddListView(UIElement listView)
        {
            this.listHost.Content = null;
            this.listHost.Content = listView;
        }
    }
}
